<template>
    <div :class="type" class="loading-div">
        <div class="loading-div-content">
            <div class="ant-spin ant-spin-spinning">
                <span class="ant-spin-dot ant-spin-dot-spin">
                    <i></i>
                    <i></i>
                    <i></i>
                    <i></i>
                </span>
                <div class="ant-spin-text">Loading...</div>
            </div>
        </div>

    </div>
</template>
<script>
export default {
    props: ['type'],
    data() {
        return {};
    },
    mounted() {},
    created() {
        console.info(this.type);
    },
    mounted() {}
};
</script>
<style>
@-webkit-keyframes antRotate {
    to {
        -webkit-transform: rotate(405deg);
        transform: rotate(405deg);
    }
}
@keyframes antRotate {
    to {
        -webkit-transform: rotate(405deg);
        transform: rotate(405deg);
    }
}
@-webkit-keyframes antSpinMove {
    to {
        opacity: 1;
    }
}
@keyframes antSpinMove {
    to {
        opacity: 1;
    }
}
.loading-div {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0);
}
.loading-div .loading-div-content {
    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -30px;
    margin-top: -60px;
}
.loading-div.larger .loading-div-content {
    margin-left: -40px;
    margin-top: -60px;
}
.ant-spin {
    font-size: 14px;
    font-variant: tabular-nums;
    line-height: 1.5;
    color: rgba(0, 0, 0, 0.65);
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    list-style: none;
    color: #fff;
    vertical-align: middle;
    text-align: center;
    opacity: 0;
    position: absolute;
    -webkit-transition: -webkit-transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
    transition: -webkit-transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
    transition: transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
    transition: transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86), -webkit-transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
    display: none;
}
.ant-spin-spinning {
    opacity: 1;
    position: static;
    display: inline-block;
}
.ant-spin-dot {
    position: relative;
    display: inline-block;
    font-size: 20px;
    width: 20px;
    height: 20px;
}
.larger .ant-spin-dot {
    font-size: 30px;
    width: 60px;
    height: 60px;
}
.ant-spin-dot i:nth-child(1) {
    left: 0;
    top: 0;
}
.ant-spin-dot i:nth-child(2) {
    right: 0;
    top: 0;
    -webkit-animation-delay: 0.4s;
    animation-delay: 0.4s;
}
.ant-spin-dot i:nth-child(3) {
    right: 0;
    bottom: 0;
    -webkit-animation-delay: 0.8s;
    animation-delay: 0.8s;
}
.ant-spin-dot i:nth-child(4) {
    left: 0;
    bottom: 0;
    -webkit-animation-delay: 1.2s;
    animation-delay: 1.2s;
}
.ant-spin-dot i {
    width: 18px;
    height: 18px;
    border-radius: 100%;
    background-color: #fff;
    -webkit-transform: scale(0.75);
    -ms-transform: scale(0.75);
    transform: scale(0.75);
    display: block;
    position: absolute;
    opacity: 0.3;
    -webkit-animation: antSpinMove 1s infinite linear alternate;
    animation: antSpinMove 1s infinite linear alternate;
    -webkit-transform-origin: 50% 50%;
    -ms-transform-origin: 50% 50%;
    transform-origin: 50% 50%;
}
.larger .ant-spin-dot i {
    width: 24px;
    height: 24px;
}
.ant-spin-dot-spin {
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
    -webkit-animation: antRotate2 1.2s infinite linear;
    animation: antRotate 1.2s infinite linear;
}
.larger .ant-spin-text {
    font-size: 24px;
    margin-top:12px;
    font-weight: 600;
}
</style>
